package com.telecom.restaurant.dao;

import com.telecom.restaurant.model.UserCartPO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserCartDao {
    int deleteByPrimaryKey(@Param("userId") Long userId, @Param("id") Long id);

    int deleteByUser(@Param("userId") Long userId);

    int insert(UserCartPO record);

    List<UserCartPO> selectByUserId(@Param("userId") Long userId);

    UserCartPO selectById(@Param("id") Long id);

    int changeCartCount(@Param("userId") Long userId, @Param("id") Long id,
                        @Param("changeCount") Integer changeCount);
}